
package com.joysuch.wwyt.datadump.biz.query;

import cn.zlg.common.datadump.condition.QueryCondtionDef;
import cn.zlg.common.datadump.condition.QueryFieldCondition;
import cn.zlg.common.datadump.condition.SortFieldDef;
import com.joysuch.wwyt.bp.entity.dsl.QBpProductionFacility;
import com.joysuch.wwyt.bp.entity.dsl.QBpStorageTankArea;
import com.querydsl.core.types.Order;

public class BpStorageTankAreaDumpQueryBean implements QueryCondtionDef {

    @Override
    public QueryFieldCondition[] getAllConditionDef() {
        return new QueryFieldCondition[] {
                new QueryFieldCondition("ids", QBpStorageTankArea.bpStorageTankArea,
                        QBpStorageTankArea.bpStorageTankArea.id, QBpStorageTankArea.bpStorageTankArea.id, "in"),
                new QueryFieldCondition("name", QBpStorageTankArea.bpStorageTankArea,
                        QBpStorageTankArea.bpStorageTankArea.name, QBpStorageTankArea.bpStorageTankArea.id,
                        "contains"), };
    }

    @Override
    public SortFieldDef[] getAllSortFieldDef() {
        return new SortFieldDef[] {
                new SortFieldDef(QBpStorageTankArea.bpStorageTankArea.id, "id", Order.DESC, true),
                new SortFieldDef(QBpStorageTankArea.bpStorageTankArea.name, "name", Order.ASC) };
    }
}
